package com.controller.seedoctor;


import com.comm.vo.DoctorShiftVo;
import io.swagger.annotations.*;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/seeDoctor/Scheduling")
@Api(value = "医生排班",tags = "医生排班")
@ApiResponses({
        @ApiResponse(code=200,message="请求成功"),
        @ApiResponse(code=404,message="找不到页面"),
        @ApiResponse(code=405,message="请求方法错误"),
        @ApiResponse(code=500,message="后台服务错误")
})
public class DoctorShiftsController {


    /**
     * 获得所有医生的基本信息
     * @param currentPage
     * @param pageSize
     * @return
     */
    @GetMapping("/getAllDoctor")
    @ApiOperation(value = "获取所有医生基本信息",notes = "获取所有医生")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "currentPage",value = "当前页",paramType = "query",dataType = "int",required = true),
            @ApiImplicitParam(name = "pageSize",value = "每页的条数",paramType = "query",dataType = "int",required = true),

    })
    public String getAllDoctor(String currentPage,String  pageSize){

        return "{\n" +
                "  \"code\": 200,\n" +
                "  \"msg\": \"成功！\",\n" +
                "  \"data\": [{\n" +
                "\"id\": 1,\n" +
                "        \"empName\": \"马云\",\n" +
                "        \"officName\": \"外科\"\n" +
                "  },\n" +
                "    {\n" +
                "\"id\": 2,\n" +
                "      \"empName\": \"马华腾\",\n" +
                "      \"officName\": \"内科\"\n" +
                "    },\n" +
                "    {\n" +
                "\"id\": 5,\n" +
                "      \"empName\": \"王健林\",\n" +
                "      \"officName\": \"肛肠科\"\n" +
                "    },\n" +
                "    {\n" +
                "\"id\": 7,\n" +
                "      \"empName\": \"王菲\",\n" +
                "      \"officName\": \"牙科\"\n" +
                "    },\n" +
                "    {\n" +
                "\"id\": 3,\n" +
                "      \"empName\": \"王思聪\",\n" +
                "      \"officName\": \"儿科\"\n" +
                "    },\n" +
                "    {\n" +
                "\"id\": 6,\n" +
                "      \"empName\": \"小马云\",\n" +
                "      \"officName\": \"外科\"\n" +
                "    },\n" +
                "    {\n" +
                "\"id\": 4,\n" +
                "      \"empName\": \"张学友\",\n" +
                "      \"officName\": \"外科\"\n" +
                "    }, {\n" +
                "\"id\": 10,\n" +
                "      \"empName\": \"周杰伦\",\n" +
                "      \"officName\": \"儿科\"\n" +
                "    }, {\n" +
                "\"id\": 11,\n" +
                "      \"empName\": \"杨女士\",\n" +
                "      \"officName\": \"外科\"\n" +
                "    }\n" +
                "  ]\n" +
                "}";
    }


    /**
     * 获取在该周所有医生的值班信息
     * @param startDate
     * @param endDate
     * @return
     */
    @GetMapping("/getAllDoctorShiftsByDate")
    @ApiOperation(value = "获取在该周所有医生的值班信息",notes = "医生排班信息")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "startDate",value = "一周的开始时间",paramType = "query",dataType = "String",required = true),
            @ApiImplicitParam(name = "endDate",value = "一周的结束时间",paramType = "query",dataType = "String",required = true),

    })
    public String getAllDoctorShiftsByDate(String startDate,String endDate){


        return "{\n" +
                "  \"code\": 200,\n" +
                "  \"msg\": \"成功！\",\n" +
                "  \"data\": [\n" +
                "    {\n" +
                "      \"id\": 1,\n" +
                "      \"doctorName\": \"马云\",\n" +
                "      \"department\": \"外科\",\n" +
                "      \"remark\": \"2022-2-13\",\n" +
                "      \"createDate\": \"上午\",\n" +
                "\"doctorId\": 1,\n" +
                "      \"registrationFee\": {\n" +
                "\"id\": 1,\n" +
                "      \"regType\": \"看病\",\n" +
                "        \"regMoney\": 12.0\n" +
                "      }\n" +
                "    },\n" +
                "    {\n" +
                "      \"id\": 2,\n" +
                "      \"doctorName\": \"马化腾\",\n" +
                "      \"department\": \"内科\",\n" +
                "      \"remark\": \"2022-2-13\",\n" +
                "      \"createDate\": \"上午\",\n" +
                "\"doctorId\": 2,\n" +
                "      \"registrationFee\": {\n" +
                "\"id\": 2,\n" +
                "        \"regType\": \"就诊\",\n" +
                "        \"regMoney\": 50.0\n" +
                "      }\n" +
                "    },{\n" +
                "      \"id\": 3,\n" +
                "      \"doctorName\": \"马云\",\n" +
                "      \"department\": \"外科\",\n" +
                "      \"remark\": \"2022-2-13\",\n" +
                "      \"createDate\": \"下午\",\n" +
                "\"doctorId\": 1,\n" +
                "      \"registrationFee\": {\n" +
                "\"id\": 2,\n" +
                "        \"regType\": \"就诊\",\n" +
                "        \"regMoney\": 50.0\n" +
                "      }\n" +
                "    },{\n" +
                "      \"id\": 4,\n" +
                "      \"doctorName\": \"王思聪\",\n" +
                "      \"department\": \"儿科\",\n" +
                "      \"remark\": \"2022-2-14\",\n" +
                "      \"createDate\": \"上午\",\n" +
                "\"doctorId\": 3,\n" +
                "      \"registrationFee\": {\n" +
                "\"id\": 1,\n" +
                "        \"regType\": \"看病\",\n" +
                "        \"regMoney\": 12.0\n" +
                "      }\n" +
                "    },\n" +
                "    {\n" +
                "      \"id\": 5,\n" +
                "      \"doctorName\": \"王思聪\",\n" +
                "      \"department\": \"儿科\",\n" +
                "      \"remark\": \"2022-2-14\",\n" +
                "      \"createDate\": \"下午\",\n" +
                "\"doctorId\": 3,\n" +
                "      \"registrationFee\": {\n" +
                "\"id\": 1,\n" +
                "        \"regType\": \"看病\",\n" +
                "        \"regMoney\": 12.0\n" +
                "      }\n" +
                "    },{\n" +
                "      \"id\": 6,\n" +
                "      \"doctorName\": \"王思聪\",\n" +
                "      \"department\": \"儿科\",\n" +
                "      \"remark\": \"2022-2-14\",\n" +
                "      \"createDate\": \"晚上\",\n" +
                "\"doctorId\": 3,\n" +
                "      \"registrationFee\": {\n" +
                "\"id\": 2,\n" +
                "        \"regType\": \"就诊\",\n" +
                "        \"regMoney\": 50.0\n" +
                "      }\n" +
                "    }\n" +
                "  ,\n" +
                "    {\n" +
                "      \"id\": 7,\n" +
                "      \"doctorName\": \"张学友\",\n" +
                "      \"department\": \"外科\",\n" +
                "      \"remark\": \"2022-2-15\",\n" +
                "      \"createDate\": \"上午\",\n" +
                "\"doctorId\": 4,\n" +
                "      \"registrationFee\": {\n" +
                "\"id\": 2,\n" +
                "        \"regType\": \"就诊\",\n" +
                "        \"regMoney\": 50.0\n" +
                "      }\n" +
                "    },{\n" +
                "      \"id\": 8,\n" +
                "      \"doctorName\": \"张学友\",\n" +
                "      \"department\": \"外科\",\n" +
                "      \"remark\": \"2022-2-15\",\n" +
                "      \"createDate\": \"下午\",\n" +
                "\"doctorId\": 4,\n" +
                "      \"registrationFee\": {\n" +
                "\"id\": 2,\n" +
                "        \"regType\": \"就诊\",\n" +
                "        \"regMoney\": 50.0\n" +
                "      }\n" +
                "    },\n" +
                "    {\n" +
                "      \"id\": 9,\n" +
                "      \"doctorName\": \"张学友\",\n" +
                "      \"department\": \"外科\",\n" +
                "      \"remark\": \"2022-2-20\",\n" +
                "      \"createDate\": \"下午\",\n" +
                "\"doctorId\": 4,\n" +
                "      \"registrationFee\": {\n" +
                "\"id\": 2,\n" +
                "        \"regType\": \"就诊\",\n" +
                "        \"regMoney\": 50.0\n" +
                "      }\n" +
                "    },\n" +
                "    {\n" +
                "      \"id\": 10,\n" +
                "      \"doctorName\": \"张学友\",\n" +
                "      \"department\": \"外科\",\n" +
                "      \"remark\": \"2022-2-21\",\n" +
                "      \"createDate\": \"下午\",\n" +
                "\"doctorId\": 4,\n" +
                "      \"registrationFee\": {\n" +
                "\"id\": 1,\n" +
                "        \"reg_type\": \"看病\",\n" +
                "        \"regMoney\": 12.0\n" +
                "      }\n" +
                "    }\n" +
                "\n" +
                "  ]\n" +
                "}";
    }


    /**
     * 通过该医生的id拿到该医生在这一周的值班信息,以张学友在2-13到2-19为例
     * @param doctorId
     * @param startDate
     * @param endDate
     * @return
     */
    @GetMapping("/getInfoByDoctorId")
    @ApiOperation(value = "通过该医生的id拿到该医生在这一周的值班信息,以张学友在2-13到2-19为例",notes = "编辑")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "doctorId",value = "通过医生的id拿到该医生在该时段的所有值班信息",paramType = "query",dataType = "int",required = true),
            @ApiImplicitParam(name = "startDate",value = "一周的开始时间",paramType = "query",dataType = "String",required = true),
            @ApiImplicitParam(name = "endDate",value = "一周的结束时间",paramType = "query",dataType = "String",required = true),

    })
    public String getInfoByDoctorId(String doctorId ,String startDate,String endDate){
        return "{\n" +
                "  \"code\": 200,\n" +
                "  \"msg\": \"成功！\",\n" +
                "  \"data\": [\n" +
                "    {\n" +
                "      \"id\": 4,\n" +
                "      \"doctorName\": \"张学友\",\n" +
                "      \"department\": \"外科\",\n" +
                "      \"remark\": \"2022-2-15\",\n" +
                "      \"createDate\": \"上午\",\n" +
                "      \"registrationFee\": {\n" +
                "\"id\": 2,\n" +
                "        \"reg_type\": \"就诊\",\n" +
                "        \"reg_money\": 50.0\n" +
                "      }\n" +
                "    },{\n" +
                "      \"id\": 4,\n" +
                "      \"doctorName\": \"张学友\",\n" +
                "      \"department\": \"外科\",\n" +
                "      \"remark\": \"2022-2-15\",\n" +
                "      \"createDate\": \"下午\",\n" +
                "      \"registrationFee\": {\n" +
                "\"id\": 2,\n" +
                "        \"regType\": \"就诊\",\n" +
                "        \"regMoney\": 50.0\n" +
                "      }\n" +
                "    },\n" +
                "    {\n" +
                "      \"id\": 4,\n" +
                "      \"doctorName\": \"张学友\",\n" +
                "      \"department\": \"外科\",\n" +
                "      \"remark\": \"2022-2-20\",\n" +
                "      \"createDate\": \"下午\",\n" +
                "      \"registrationFee\": {\n" +
                "\"id\": 2,\n" +
                "        \"regType\": \"就诊\",\n" +
                "        \"regMoney\": 50.0\n" +
                "      }\n" +
                "    },\n" +
                "    {\n" +
                "      \"doctorId\": 1,\n" +
                "      \"id\": 4,\n" +
                "      \"doctorName\": \"张学友\",\n" +
                "      \"department\": \"外科\",\n" +
                "      \"remark\": \"2022-2-21\",\n" +
                "      \"createDate\": \"下午\",\n" +
                "      \"registrationFee\": {\n" +
                "\"id\": 1,\n" +
                "        \"regType\": \"看病\",\n" +
                "        \"regMoney\": 12.0\n" +
                "      }\n" +
                "    }\n" +
                "\n" +
                "  ]\n" +
                "}";
    }


    /**
     * 获取挂号类型
     * @return
     */

    @GetMapping("/updateDoctorShifts")
    @ApiOperation(value = "获取挂号类型",notes = "挂号类型")
    public String getGuaHaoType(){
        return "{\n" +
                "  \"code\": 200,\n" +
                "  \"msg\": \"成功！\",\n" +
                "  \"data\": [\n" +
                "    {\n" +
                "      \"id\": 1,\n" +
                "      \"regType\": \"看病\",\n" +
                "      \"regMoney\": 12.0\n" +
                "    },  {\n" +
                "      \"id\": 2,\n" +
                "      \"regType\": \"就诊\",\n" +
                "      \"regMoney\": 50.0\n" +
                "    }\n" +
                "  ]\n" +
                "}";
    }

    /**
     * 确定按钮，用于提交排班信息，或者更改排班信息
     * @return
     */

    @PostMapping("/updateDoctorShifts")
    @ApiOperation(value = "确定按钮，用于提交排班信息，或者更改排班信息",notes = "确定")
    public String  updateDoctorShifts(@RequestBody @ApiParam(name = "vo" ,value = "确定按钮需要提交的数据" ,required = true) DoctorShiftVo vo){
        return "{\n" +
                "  \"code\": 200,\n" +
                "  \"msg\": \"成功！\",\n" +
                "  \"data\": []\n" +
                "}";
    }


}
